package com.senlingspace.system.service.impl;

import java.util.List;
import com.senlingspace.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.senlingspace.system.mapper.SlkjShopProjectMapper;
import com.senlingspace.system.domain.SlkjShopProject;
import com.senlingspace.system.service.ISlkjShopProjectService;

/**
 * 门店项目关联Service业务层处理
 * 
 * @author SenlingSpace
 * @date 2024-06-28
 */
@Service
public class SlkjShopProjectServiceImpl implements ISlkjShopProjectService 
{
    @Autowired
    private SlkjShopProjectMapper slkjShopProjectMapper;

    /**
     * 查询门店项目关联
     * 
     * @param id 门店项目关联主键
     * @return 门店项目关联
     */
    @Override
    public SlkjShopProject selectSlkjShopProjectById(Long id)
    {
        return slkjShopProjectMapper.selectSlkjShopProjectById(id);
    }

    /**
     * 查询门店项目关联列表
     * 
     * @param slkjShopProject 门店项目关联
     * @return 门店项目关联
     */
    @Override
    public List<SlkjShopProject> selectSlkjShopProjectList(SlkjShopProject slkjShopProject)
    {
        return slkjShopProjectMapper.selectSlkjShopProjectList(slkjShopProject);
    }

    /**
     * 新增门店项目关联
     * 
     * @param slkjShopProject 门店项目关联
     * @return 结果
     */
    @Override
    public int insertSlkjShopProject(SlkjShopProject slkjShopProject)
    {
        slkjShopProject.setCreateTime(DateUtils.getNowDate());
        return slkjShopProjectMapper.insertSlkjShopProject(slkjShopProject);
    }

    /**
     * 修改门店项目关联
     * 
     * @param slkjShopProject 门店项目关联
     * @return 结果
     */
    @Override
    public int updateSlkjShopProject(SlkjShopProject slkjShopProject)
    {
        slkjShopProject.setUpdateTime(DateUtils.getNowDate());
        return slkjShopProjectMapper.updateSlkjShopProject(slkjShopProject);
    }

    /**
     * 批量删除门店项目关联
     * 
     * @param ids 需要删除的门店项目关联主键
     * @return 结果
     */
    @Override
    public int deleteSlkjShopProjectByIds(Long[] ids)
    {
        return slkjShopProjectMapper.deleteSlkjShopProjectByIds(ids);
    }

    /**
     * 删除门店项目关联信息
     * 
     * @param id 门店项目关联主键
     * @return 结果
     */
    @Override
    public int deleteSlkjShopProjectById(Long id)
    {
        return slkjShopProjectMapper.deleteSlkjShopProjectById(id);
    }
}
